<template>
  <div>
    <v-touch class="swiper-div" @swiperight="onSwiperRight" :swipe-options="{direction: 'horizontal'}">
      <head-top
          :title="'订单详情'"
          :left-router="$route.query.srcUrl ? $route.query.srcUrl : this.GLOBAL.pathSetting.order.main + '?tab=' + $route.query.tab"
          :right-text="isCompleted ? '' : '编辑'"
          :right-router="isCompleted ? '' : '/order/' + $route.params.type + '/edit/'"
          :right-param="isCompleted ? '' : {id: $route.params.id}"
      ></head-top>
      <order-info></order-info>
    </v-touch>
  </div>
</template>

<script>
import OrderInfo from "@/components/order/info";
import HeadTop from "@/components/HeadTop";

export default {
  components: {
    OrderInfo,
    HeadTop,
  },
  name: "OrderPaymentInfo",
  data() {
    return {
      isCompleted: Number(this.$route.params.type) === this.GLOBAL.listItemType.order.completed
    };
  },
  methods: {
    onSwiperRight() {
      this.$router.go(-1)
    }
  },
};
</script>
<style scoped>
</style>
<style>
</style>